import createjs from 'createjs-ts';
import cjs=createjs
export default class Diamond extends cjs.Shape {
    speed=1;
    constructor(len:number) {
        super();
        this.graphics.beginLinearGradientFill(['#fff29d','#ffd70f'],[0,1],0,0,len,len)
        this.graphics.drawRect(0,0,len,len);
        this.graphics.endFill();
        this.rotation=45;
        const l=len*Math.sin(Math.PI/4);
        this.setBounds(-l,0,l*2,l*2)
    }
}